<template>
  <div class='shop-box'>
    <div class='my-car'>我的购物车</div>
    <el-table
      ref='multipleTable'
      :data='tableData'
      tooltip-effect='dark'
      style='width: 100%'
      @selection-change='handleSelectionChange'
      @select-all='changeSelectAll'
    >
      <el-table-column type='selection' width='55'></el-table-column>
      <el-table-column label='商品信息' width='230'>
        <template slot-scope='scope'>{{ scope.row.detail }}</template>
      </el-table-column>
      <el-table-column prop='price' label='单价（元）'></el-table-column>
      <el-table-column prop='count' label='数量'></el-table-column>
      <el-table-column prop='total' label='合计（元）'></el-table-column>
      <el-table-column label='操作'>
        <template slot-scope='scope'>
          <el-button
            @click.native.prevent='deleteRow(scope.$index, tableData)'
            type='text'
            size='small'
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <div class='shop-account'>
      <div class='selected'>
        <el-checkbox :value='selectAll' @change='toggleAllSelection'>全选</el-checkbox>
      </div>
      <div class='allDelete' @click='deleteAll'>全部删除</div>
      <div class='selected-goods'>
        已选商品：
        <span>{{selectCount}}</span>件
      </div>
      <div class='count-all'>
        合计（不含运费）：￥
        <span>264</span>
      </div>
      <button @click='goCount()' class='go-count'>去结算</button>
    </div>
    <!-- <Count /> -->
  </div>
</template>
<style>
@import "./index.less";
</style>
<script src="./index.js">
</script>